<template>
  <div class="song-list-container">
    <el-row>
      <el-col :span="6">
        <div class="song-list-left">
          <div class="title-item">
            <div @click="swatchTab('SongCategoryList')" :class="'SongCategoryList'==assembly?'active':''">我的歌手(5)</div>
            <div @click="swatchTab('MyVideo')" :class="'MyVideo'==assembly?'active':''">我的视频(8)</div>
            <div @click="swatchTab('MyRadio')" :class="'MyRadio'==assembly?'active':''">我的电台(5)</div>
            <div @click="swatchTab('RadioSongList')" :class="'RadioSongList'==assembly?'active':''">我的电台歌单(10)</div>
            <div @click="swatchTab('CollectionOfSongs')" :class="'CollectionOfSongs'==assembly?'active':''">收藏的歌单(16)</div>
          </div>
        </div>
      </el-col>
      <el-col :span="18">
        <div class="song-list-right">
          <div class="song-list" :is="assembly" keep-alive>

          </div>
        </div>
      </el-col>
    </el-row>

  </div>
</template>

<script>
import SongCategoryList from '../../../components/SongCategoryList'
import MyVideo from '../MyVideo'
import MyRadio from '../MyRadio'
import RadioSongList from '../RadioSongList'
import CollectionOfSongs from '../CollectionOfSongs'
export default {
  name: 'MySongList',
  components: {
    SongCategoryList,
    MyRadio,
    MyVideo,
    RadioSongList,
    CollectionOfSongs
  },
  data(){
    return {
      assembly:"SongCategoryList"
    }
  },
  methods:{
    swatchTab(nav){
      this.assembly = nav
    }
  }
}
</script>

<style  scoped>
.song-list-container {
  width: 1000px;
  height: 2000px;
  margin: 0 auto;
  border: 1px solid #ccc;
  border-top: none;
  border-bottom: none;
  overflow: hidden;

}

.song-list-left {
  height: 2000px;
  border-right: 1px solid #ccc;
  /* background-color: #f9f9f9; */
  overflow: hidden;

}
.title-item {
  margin-top: 40px;
  font-size: 16px;
  font-weight: 800;
}
.title-item div {
  padding: 10px 15px;
  cursor: default;
}
.title-item div:hover {
  background-color: #eee;
}
.song-list-right {
  height: calc(100vh - 61px);
}
.song-list-right .song-detail {
  height: 280px;
  width: 100%;
  /* background-color: #ccc; */
}
.active {
  background-color: #eee;
}
</style>
